package com.newenergy.wisehome.data.bean;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

import java.util.UUID;

/**
 * Created by kyx on 2018/4/25.
 * 窗帘实体类
 */
@DatabaseTable(tableName = "tb_curtain")
public class Curtain {

    @DatabaseField(generatedId = true)
    private int id;
    @DatabaseField(columnName = "uuid")
    private String uuid= UUID.randomUUID().toString();
    @DatabaseField(columnName = "familyId")
    private String familyId;
    @DatabaseField(columnName = "category")
    private int category = 6;//6代表空调种类
    @DatabaseField(columnName = "groupId")
    private String groupId;
    @DatabaseField(columnName = "name")
    private String name;
    @DatabaseField(columnName = "pingyinName")
    private String pingyinName;
    @DatabaseField(columnName = "isChecked")
    private boolean isChecked = false;
    @DatabaseField(columnName = "icName")
    private String icName = "icon_bedroom";

    public Curtain() {
    }

    public Curtain(String familyId, int category, String name) {
        this.familyId = familyId;
        this.category = category;
        this.name = name;
    }

    public Curtain(String familyId, int category, String groupId, String name) {
        this.familyId = familyId;
        this.category = category;
        this.groupId = groupId;
        this.name = name;
    }

    public Curtain(String familyId,int category, String groupId, String name, String pingyinName, boolean isChecked, String icName) {
        this.familyId = familyId;
        this.category = category;
        this.groupId = groupId;
        this.name = name;
        this.pingyinName = pingyinName;
        this.isChecked = isChecked;
        this.icName = icName;
    }

    public int getId() {
        return id;
    }

    public String getUuid() {
        return uuid;
    }

    public String getFamilyId() {
        return familyId;
    }

    public void setFamilyId(String familyId) {
        this.familyId = familyId;
    }

    public int getCategory() {
        return category;
    }

    public void setCategory(int category) {
        this.category = category;
    }

    public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPingyinName() {
        return pingyinName;
    }

    public void setPingyinName(String pingyinName) {
        this.pingyinName = pingyinName;
    }

    public boolean isChecked() {
        return isChecked;
    }

    public void setChecked(boolean checked) {
        isChecked = checked;
    }

    public String getIcName() {
        return icName;
    }

    public void setIcName(String icName) {
        this.icName = icName;
    }

    @Override
    public String toString() {
        return "Curtain{" +
                "id=" + id +
                ", familyId='" + familyId + '\'' +
                ", category=" + category +
                ", groupId='" + groupId + '\'' +
                ", name='" + name + '\'' +
                ", pingyinName='" + pingyinName + '\'' +
                ", isChecked=" + isChecked +
                ", icName='" + icName + '\'' +
                '}';
    }

    public DeviceCategory  covertToDeviceCategory(){
        DeviceCategory deviceCategory=new DeviceCategory(uuid,familyId,category,groupId,name,pingyinName,icName);
        return deviceCategory;
    }
}
